home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
MATH.SCR
< prev
next >
Wrap
Text File
|
1991-12-13
|
2KB
|
45 lines
.pg wi full clr cy
COMMAND NAME»gray«: »%t« Math »ye«
/MATH {Variable} {Formula}
/cw
The »%t«Math»#« command evaluates »cy«{formula}»#« and stores the
result in the Result variable indicated by
»cy«{Variable}»#«. »wh«Variables in »cy«{formula}»wh« are
expanded.»#«
.pg clr
The »%t«Math»#« command supports the following functions:
.wi 1 7 79 22
»wh«+»#« Addition »wh«/»#« Division
»wh«-»#« Subtraction »wh«^»#« Exponentiation
»wh«*»#« Multiplication »wh«()»#« Grouping
»wh«ABS»#« Returns the absolute value of the argument
»wh«ATAN»#« Returns the arctangent of the argument
»wh«COS»#« Returns the cosine of the argument
»wh«EXP»#« Returns the exponential
»wh«LN»#« Returns the natural logarithm of the argument
»wh«ROUND»#« Rounds a real number to an integer
»wh«SIN»#« Returns the sine of the argument
»wh«SQRT»#« Returns the square root of the argument
»wh«SQR»#« Returns the square of the argument
»wh«TRUNC»#« Truncates a real to an integer
.pg wi 1 5 79 22 clr
Here are some »%t«/MATH»#« commands and their results:
.go 1 11
|/MATH Num1 5*3
.go 4 10
»gr«Result»gy«:»wh« %Num1(#,###,###.##-)»#«
|/MATH Num1 LN(25)
.go 4 10
»gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
|/MATH Num1 25
|/MATH Num1 (%Num1/10)*SQRT(%Num1)
.go 4 10
»gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
|/SET Var1 10
|/MATH Num1 %Var1^3
.go 4 10
»gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
/ENDEXEC CLEAR